#include<stdio.h>
replace(char *s,char c1,char c2) 
{
	while(*s!="\0"){
		if(*s==c1)
		   *s=c2;
		s++;
	}
}
main(){
	char str[21],a,b;
	printf("Enter a string:\n");
	gets(str);
	printf("Enter a,b:\n");
	scanf("%s %s",&a,&b);
	replace(str,a,b);
	printf("The new string is:%s",str);
}
